PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


ThemeButtonDrawUPP

The Appearance Manager defines the type for an application-defined button label drawing function as follows:

typedef pascal (void, ThemeButtonDrawProcPtr) (
                     const Rect *bounds,
                     ThemeButtonKind kind,
                     ThemeButtonDrawInfo *info,
                     UInt32 userData,
                     SInt16 depth,
                     Boolean isColorDev);

The Appearance Manager defines the data type ThemeButtonDrawUPP to identify the universal procedure pointer for an application-defined button label drawing function:

typedef ThemeButtonDrawProcPtr ThemeButtonDrawUPP;

You typically use the NewThemeButtonDrawProc macro like this:

ThemeButtonDrawUPP myThemeButtonDrawUPP;
myThemeButtonDrawUPP = NewThemeButtonDrawProc(MyThemeButtonDrawProc);

You typically use the CallThemeButtonDrawProc macro like this:

CallThemeButtonDrawProc(myThemeButtonDrawUPP, bounds, kind, info, userData,
depth, isColorDev);

To implement your own button label drawing function, see MyThemeButtonDrawProc . The ThemeButtonDrawProcPtr type is available with Appearance Manager 1.1 and later.


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)